<template>
	<view class="page">
		{{ $t('Home.test') }}
		<button @click="switchZh">中文</button>
		<button @click="switchEn">英文</button>
	</view>
</template>

<script>
	import {
		api,
		apiBaseUrl,
		http
	} from '@/config/common.js'

	export default {
		data() {
			return {}
		},
		components: {},
		filters: {},
		mounted() {
		},
		onLoad(e) {
		},
		onShow() {
		},
		beforeDestroy() {
		},
		methods: {
			switchEn() {
				//中文
				this._i18n.locale = 'en';
				uni.setStorageSync('lang', 'en');
			},
			switchZh() {
				//中文
				this._i18n.locale = 'cn';
				uni.setStorageSync('lang', 'cn');
			},
			demoApi() {
				api.post('', {}).then(res => {}).catch(err => {})
			},
		}
	};
</script>

<style scoped>

</style>